package com.yanxu.controller;

import com.yanxu.model.domain.ResultInfo;
import com.yanxu.service.DinersService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025-09-25-2025
 * @Description: 食客服务controller
 */
@RestController
@RequestMapping("diners")
public class DinersController {
    @Resource
    private DinersService dinersService;
    @Resource
    private HttpServletRequest request;

    @GetMapping("signin")
    public ResultInfo signIn(String account, String password) {
        return dinersService.signIn(account, password, request.getServletPath());
    }
}